package com.filmbooks.model.detail;

import com.filmbooks.api.WangyiApi;
import com.filmbooks.contract.detail.WangyiDetailContract;
import com.zyw.horrarndoo.sdk.base.BaseModel;
import com.zyw.horrarndoo.sdk.helper.RetrofitCreateHelper;
import com.zyw.horrarndoo.sdk.helper.RxHelper;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by heshuxiang on 2018/3/8.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/3/8.
 * 工程：FilmBooks
 * 包：com.filmbooks.model.detail
 */

public class WangyiDetailModel extends BaseModel implements WangyiDetailContract.IWangyiDetailModel {
    @Override
    public Observable<ResponseBody> getNewsDetail(String id) {
        return RetrofitCreateHelper.createApi(WangyiApi.class, WangyiApi.HOST).getNewsDetail(id).compose(RxHelper.<ResponseBody>rxSchedulerHelper());
    }
    public static WangyiDetailModel newInstance(){
        return new WangyiDetailModel();
    }
}
